# views.py: 路由 + 视图函数

from flask import Blueprint, request, jsonify ,current_app
from .models import *
from .util.stringToDict import witstringToDict, insolestringToDict

# 蓝图
blue = Blueprint('user', __name__)




@blue.route('/')
def index():
    return 'index'


@blue.route('/greet', methods=['POST'])
def receive_greeting():
    message = request.data.decode('utf-8') # 获取请求体中的数据，并解码为字符串
    print(f"Received message: {message}")
    return f"Message received: {message}"



